import request from '@/request'

export function findAll(data) {
    return request.post("indent/findByPage", data);
}

export function findOne(indentId) {
    return request.post("indent/findOne", indentId, request.textConfig);
}

export function doSaveOrUpdate(data) {
    let path = data.indentId ? "update" : "save";
    return request.post(`indent/${path}`, data);
}

export function deleteByIndentId(indentId) {
    return request.post("indent/delete", indentId, request.textConfig);
}

export function updateById(indent) {
    return request.post(`indent/update`, indent);
}


export function pay(indent){
    return request.post(`indent/pay`, indent);
}
export function returnBed(indent){
    return request.post(`indent/returnBed`, indent);
}
export function saveIndent(indent){
    return request.post(`indent/save`, indent);
}

